import 'dart:convert' show json;

class HomeBannerResult {
  String message;
  String code;
  bool success;
  List<HomeBannerBean> entity;

  HomeBannerResult({this.message, this.code, this.success, this.entity});

  HomeBannerResult.fromJson(Map<String, dynamic> json) {
    message = json['message'];
    code = json['code'];
    success = json['success'];
    if (json['entity'] != null) {
      entity = new List<HomeBannerBean>();
      json['entity'].forEach((v) {
        entity.add(new HomeBannerBean.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['message'] = this.message;
    data['code'] = this.code;
    data['success'] = this.success;
    if (this.entity != null) {
      data['entity'] = this.entity.map((v) => v.toJson()).toList();
    }
    return data;
  }

  static formjson(data) {}
}

class HomeBannerBean {
  int id;
  String imagesUrl;
  String mobileImagesUrl;
  String linkAddress;
  String title;
  String bgImagesUrl;
  String activityId;
  String keyWord;
  int seriesNumber;
  String color;
  String previewUrl;
  int imageUsageId;
  bool isShow;

  HomeBannerBean(
      {this.id,
        this.imagesUrl,
        this.mobileImagesUrl,
        this.linkAddress,
        this.title,
        this.bgImagesUrl,
        this.activityId,
        this.keyWord,
        this.seriesNumber,
        this.color,
        this.previewUrl,
        this.imageUsageId,
        this.isShow});

  HomeBannerBean.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    imagesUrl = json['imagesUrl'];
    mobileImagesUrl = json['mobileImagesUrl'];
    linkAddress = json['linkAddress'];
    title = json['title'];
    bgImagesUrl = json['bgImagesUrl'];
    activityId = json['activity_id'];
    keyWord = json['keyWord'];
    seriesNumber = json['seriesNumber'];
    color = json['color'];
    previewUrl = json['previewUrl'];
    imageUsageId = json['imageUsageId'];
    isShow = json['isShow'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['imagesUrl'] = this.imagesUrl;
    data['mobileImagesUrl'] = this.mobileImagesUrl;
    data['linkAddress'] = this.linkAddress;
    data['title'] = this.title;
    data['bgImagesUrl'] = this.bgImagesUrl;
    data['activity_id'] = this.activityId;
    data['keyWord'] = this.keyWord;
    data['seriesNumber'] = this.seriesNumber;
    data['color'] = this.color;
    data['previewUrl'] = this.previewUrl;
    data['imageUsageId'] = this.imageUsageId;
    data['isShow'] = this.isShow;
    return data;
  }
}